﻿using System;

namespace diantou.dataModel
{
    /// <summary>
    /// 企业账户记录
    /// </summary>
    [fastCSharp.emit.jsonSerialize(IsAllMember = true)]
    [fastCSharp.emit.jsonParse(IsAllMember = true)]
    [fastCSharp.emit.dataSerialize(IsReferenceMember = false, IsMemberMap = false)]
    [fastCSharp.code.cSharp.sqlModel]
    public partial class enterpriseAccount
    {
        /// <summary>
        /// 交易时间
        /// </summary>
        [fastCSharp.emit.dataMember(PrimaryKeyIndex = 2)]
        public DateTime Time;
        /// <summary>
        /// 用户标识
        /// </summary>
        [fastCSharp.emit.dataMember(PrimaryKeyIndex = 1)]
        public int UserId;
        /// <summary>
        /// 交易金额(单位：分)
        /// </summary>
        public int Price;
        /// <summary>
        /// 交易类型
        /// </summary>
        public enum type : byte
        {
            /// <summary>
            /// 所有类型
            /// </summary>
            All,
            /// <summary>
            /// 账户充值
            /// </summary>
            Recharge = 1,
            /// <summary>
            /// 购买公共题库服务有效期
            /// </summary>
            BuyEnterpriseValidity = 2,
            /// <summary>
            /// 购买独占+公共题库服务有效期
            /// </summary>
            BuyEnterprisePrivateValidity = 3,
            /// <summary>
            /// 购买独占编程题
            /// </summary>
            BuyPrivateProblem = 4,
        }
        /// <summary>
        /// 交易类型
        /// </summary>
        public type Type;
        /// <summary>
        /// 交易关联标识
        /// </summary>
        public int LinkId;
    }
}
